import request from "@/axios";

export function getMyInfo(){
    return request({
        url: '/pc/userinfo/info',
        method: 'get'
    })
}

export function updateOrSaveInfo(data){
    return request({
        url: data.accountIid ? '/pc/userinfo/update' : '/pc/userinfo/save',
        method: 'post',
        data
    })
}

export function getAddressinfo(){
    return request({
        url: '/pc/addressinfo/list',
        method: 'get'
    })
}

export function getAddressById(id){
    return request({
        url: '/pc/addressinfo/info/' + id,
        method: 'get'
    })
}

export function deleteAddressByIds(data){
    return request({
        url: '/pc/addressinfo/delete',
        method: 'post',
        data
    })
}

export function updateOrSaveAddress(data){
    return request({
        url: data.id ? '/pc/addressinfo/update' : '/pc/addressinfo/save',
        method: 'post',
        data
    })
}